package com.zjuee.base.dto.common.plan;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.zjuee.base.base.Converter;
import com.zjuee.base.bean.Pages;
import com.zjuee.base.model.common.plan.PlanInfo;
import lombok.*;
import org.springframework.beans.BeanUtils;

/**
 * @author wu liang
 * @since 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class PlanInfoDto extends PlanInfo implements Converter<PlanInfo, PlanInfoDto> {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Pages page;

    /**公司名称*/
    private String bciName;
    /**企业类型*/
    private String bciType; 
    /**行政区划(省)*/
    private String bciProvince;
    /**行政区划(市)*/
    private String bciCity;
    /**行政区划(区/县)*/
    private String bciArea;
    /**行政区划(街道)*/
    private String bciStreet;
    /**行政区划(街道)多个*/
    private String bciStreets;

    @Override
    public void convertToDo(PlanInfo planInfo) {
        BeanUtils.copyProperties(this, planInfo);
    }

    @Override
    public PlanInfoDto convert(PlanInfo planInfo) {
        BeanUtils.copyProperties(planInfo, this);
        return this;
    }
}
